<?php
class AjaxUserInformer_Form_Admin_Visual extends Engine_Form {
	
	public function init() {
		$settings = Engine_Api::_ ()->getApi ( 'settings', 'MsepCore' );
		
		$this->addElement ( 'text', 'ajaxui_background_color', array ('label' => 'Background Color', 'description' => 'Select a background color.', 'value' => $settings->ajaxui->background_color, 'class' => 'ajaxui-setting color', 'notEmpty' => true ) )->addElement ( 'text', 'ajaxui_border_color', array ('label' => 'Border Color', 'description' => 'Select a color for the borders.', 'value' => $settings->ajaxui->border_color, 'class' => 'ajaxui-setting color', 'notEmpty' => true ) )->addElement ( 'text', 'ajaxui_border_width', array ('label' => 'Border Width', 'description' => 'Type a width for the borders.', 'value' => $settings->ajaxui->border_width, 'class' => 'ajaxui-setting', 'notEmpty' => true ) )->addElement ( 'text', 'ajaxui_corner_tl_radius', array ('label' => 'Corner Radius', 'description' => 'Radius for top left corner.', 'value' => $settings->ajaxui->corner_tl_radius, 'class' => 'ajaxui-setting', 'notEmpty' => true ) );
		
		$top_right = $this->createElement ( 'text', 'ajaxui_corner_tr_radius', array ('description' => 'Radius for top right corner.', 'value' => $settings->ajaxui->corner_tr_radius, 'class' => 'ajaxui-setting', 'notEmpty' => true ) );
		
		$top_right->getDecorator ( 'HtmlTag2' )->setOption ( 'style', 'border-top: 0px; padding-top: 0;' );
		
		$this->addElement ( $top_right );
		
		$bottom_left = $this->createElement ( 'text', 'ajaxui_corner_bl_radius', array ('description' => 'Radius for bottom left corner.', 'value' => $settings->ajaxui->corner_bl_radius, 'class' => 'ajaxui-setting', 'notEmpty' => true ) );
		
		$bottom_left->getDecorator ( 'HtmlTag2' )->setOption ( 'style', 'border-top: 0px; padding-top: 0;' );
		
		$this->addElement ( $bottom_left );
		
		$bottom_right = $this->createElement ( 'text', 'ajaxui_corner_br_radius', array ('description' => 'Radius for bottom right corner.', 'value' => $settings->ajaxui->corner_br_radius, 'class' => 'ajaxui-setting', 'notEmpty' => true ) );
		
		$bottom_right->getDecorator ( 'HtmlTag2' )->setOption ( 'style', 'border-top: 0px; padding-top: 0;' );
		
		$this->addElement ( $bottom_right );
		
		// init submit
		$this->addElement ( 'Button', 'submit', array ('label' => 'Save Changes', 'type' => 'submit', 'ignore' => true ) );
	}

}